Custom Scripts
Use the Custom Scripts section to set up Python scripts to run at the beginning or end of the test execution.
You can use the following constants:
Constant | Interface in TPT API | Description |
---|---|---|
TPTAPI
|
com.piketec.tpt.api.TptApi
|
root access to TPT API |
PROJECT
|
com.piketec.tpt.api.Project
|
current TPT project |
EXECUTIONCONFIG
|
com.piketec.tpt.api.ExecutionConfiguration
|
current execution configuration |
To use these constants, you must select the Enable TPT API (RMI) checkbox in the TPT Tool Preferences, see General preferences - TPT API. To get more information about using these constants, select View|Show View|Help and click TPT API, see TPT API.
The Build Progress dialog informs you about the script execution and its success or failure:
Before execution startup
In case of an script error, the test execution will be aborted immediately.
After execution shutdown
An script error has no effect on test execution or report generation.
In both cases, an icon at the execution configuration name in the Build Progress dialog is added (warning icon: , execution error icon: ).